Optimal. Leaf size=67 \[ \frac {a (c+d x)^3}{3 d}+\frac {2 b d^2 \cosh (e+f x)}{f^3}+\frac {b (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 b d (c+d x) \sinh (e+f x)}{f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3398, 3377,
2718} \begin {gather*} \frac {a (c+d x)^3}{3 d}-\frac {2 b d (c+d x) \sinh (e+f x)}{f^2}+\frac {b (c+d x)^2 \cosh (e+f x)}{f}+\frac {2 b d^2 \cosh (e+f x)}{f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3398
Rubi steps
\begin {align*} \int (c+d x)^2 (a+b \sinh (e+f x)) \, dx &=\int \left (a (c+d x)^2+b (c+d x)^2 \sinh (e+f x)\right ) \, dx\\ &=\frac {a (c+d x)^3}{3 d}+b \int (c+d x)^2 \sinh (e+f x) \, dx\\ &=\frac {a (c+d x)^3}{3 d}+\frac {b (c+d x)^2 \cosh (e+f x)}{f}-\frac {(2 b d) \int (c+d x) \cosh (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^3}{3 d}+\frac {b (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 b d (c+d x) \sinh (e+f x)}{f^2}+\frac {\left (2 b d^2\right ) \int \sinh (e+f x) \, dx}{f^2}\\ &=\frac {a (c+d x)^3}{3 d}+\frac {2 b d^2 \cosh (e+f x)}{f^3}+\frac {b (c+d x)^2 \cosh (e+f x)}{f}-\frac {2 b d (c+d x) \sinh (e+f x)}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 83, normalized size = 1.24 \begin {gather*} \frac {1}{3} a x \left (3 c^2+3 c d x+d^2 x^2\right )+\frac {b \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \cosh (e+f x)}{f^3}-\frac {2 b d (c+d x) \sinh (e+f x)}{f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(239\) vs.
\(2(65)=130\).
time = 0.36, size = 240, normalized size = 3.58
method | result | size |
risch | \(\frac {a \,d^{2} x^{3}}{3}+a d c \,x^{2}+a \,c^{2} x +\frac {a \,c^{3}}{3 d}+\frac {b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2} f x -2 c d f +2 d^{2}\right ) {\mathrm e}^{f x +e}}{2 f^{3}}+\frac {b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}+2 d^{2} f x +2 c d f +2 d^{2}\right ) {\mathrm e}^{-f x -e}}{2 f^{3}}\) | \(146\) |
derivativedivides | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {d^{2} b \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 d^{2} e b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 d c b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b \cosh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 d e c b \cosh \left (f x +e \right )}{f}+a \,c^{2} \left (f x +e \right )+b \,c^{2} \cosh \left (f x +e \right )}{f}\) | \(240\) |
default | \(\frac {\frac {d^{2} a \left (f x +e \right )^{3}}{3 f^{2}}+\frac {d^{2} b \left (\left (f x +e \right )^{2} \cosh \left (f x +e \right )-2 \left (f x +e \right ) \sinh \left (f x +e \right )+2 \cosh \left (f x +e \right )\right )}{f^{2}}-\frac {d^{2} e a \left (f x +e \right )^{2}}{f^{2}}-\frac {2 d^{2} e b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d c a \left (f x +e \right )^{2}}{f}+\frac {2 d c b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} a \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} b \cosh \left (f x +e \right )}{f^{2}}-\frac {2 d e c a \left (f x +e \right )}{f}-\frac {2 d e c b \cosh \left (f x +e \right )}{f}+a \,c^{2} \left (f x +e \right )+b \,c^{2} \cosh \left (f x +e \right )}{f}\) | \(240\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 147 vs.
\(2 (68) = 136\).
time = 0.27, size = 147, normalized size = 2.19 \begin {gather*} \frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x + b c d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {1}{2} \, b d^{2} {\left (\frac {{\left (f^{2} x^{2} e^{e} - 2 \, f x e^{e} + 2 \, e^{e}\right )} e^{\left (f x\right )}}{f^{3}} + \frac {{\left (f^{2} x^{2} + 2 \, f x + 2\right )} e^{\left (-f x - e\right )}}{f^{3}}\right )} + \frac {b c^{2} \cosh \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 108, normalized size = 1.61 \begin {gather*} \frac {a d^{2} f^{3} x^{3} + 3 \, a c d f^{3} x^{2} + 3 \, a c^{2} f^{3} x + 3 \, {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} + 2 \, b d^{2}\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - 6 \, {\left (b d^{2} f x + b c d f\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )}{3 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 151 vs.
\(2 (65) = 130\).
time = 0.15, size = 151, normalized size = 2.25 \begin {gather*} \begin {cases} a c^{2} x + a c d x^{2} + \frac {a d^{2} x^{3}}{3} + \frac {b c^{2} \cosh {\left (e + f x \right )}}{f} + \frac {2 b c d x \cosh {\left (e + f x \right )}}{f} - \frac {2 b c d \sinh {\left (e + f x \right )}}{f^{2}} + \frac {b d^{2} x^{2} \cosh {\left (e + f x \right )}}{f} - \frac {2 b d^{2} x \sinh {\left (e + f x \right )}}{f^{2}} + \frac {2 b d^{2} \cosh {\left (e + f x \right )}}{f^{3}} & \text {for}\: f \neq 0 \\\left (a + b \sinh {\left (e \right )}\right ) \left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs.
\(2 (65) = 130\).
time = 0.43, size = 146, normalized size = 2.18 \begin {gather*} \frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x + \frac {{\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} - 2 \, b d^{2} f x - 2 \, b c d f + 2 \, b d^{2}\right )} e^{\left (f x + e\right )}}{2 \, f^{3}} + \frac {{\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} + 2 \, b d^{2} f x + 2 \, b c d f + 2 \, b d^{2}\right )} e^{\left (-f x - e\right )}}{2 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 110, normalized size = 1.64 \begin {gather*} \frac {a\,d^2\,x^3}{3}+\frac {\mathrm {cosh}\left (e+f\,x\right )\,\left (b\,c^2\,f^2+2\,b\,d^2\right )}{f^3}+a\,c^2\,x+a\,c\,d\,x^2-\frac {2\,b\,d^2\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}+\frac {b\,d^2\,x^2\,\mathrm {cosh}\left (e+f\,x\right )}{f}-\frac {2\,b\,c\,d\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}+\frac {2\,b\,c\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________